package com.zzyl.mapper;

import com.zzyl.entity.NursingLevel;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Delete;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Description NursingLevelMapper
 * @Author Lisheng Li
 * @Date 2025-08-31
 */
@Mapper
public interface NursingLevelMapper {
    /**
     * 修改护理等级
     * @param nursingLevel
     */
    void updateById(NursingLevel nursingLevel);

    void insertNursingLevel(NursingLevel nursingLevel);
    /**
     * 删除护理等级
     * @param id
     */
    @Delete("delete from nursing_level where id=#{id}")
    void deleteById(Integer id);


    /**
     * 启用禁用护理等级
     * @param id
     * @param status
     */
    @Update("update nursing_level set status=#{status} where id=#{id}")
    void changeStatus(Long id, Integer status);
    List<NursingLevelVo> selectByPage(String name, Integer status);

    NursingLevel selectById(Long id);
}
